package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bob
 * @since 2021-07-05
 */
@Data
@Accessors(chain = true)
@TableName("zdd_long_term_project")
public class LongTermProject extends Model<LongTermProject> {

    private static final long serialVersionUID = 1L;

    /**
     * 长期项目id
     */
    @TableId(value = "projectid", type = IdType.AUTO)
    private Integer projectid;
    /**
     * 企业id
     */
    private Integer compid;
    /**
     * 创客id
     */
    private Integer userid;
    /**
     * 项目名称
     */
    private String projectname;
    /**
     * 项目描述
     */
    private String projectintro;
    /**
     * 周期,月份数
     */
    private Integer projectcycle;
    /**
     * 到期日期, 例如: 2022-07-07
     */
    @TableField("expire_date")
    private Date expireDate;
    /**
     * 项目总金额
     */
    private BigDecimal projectamount;
    /**
     * 项目已分批支付的总金额, 此值不得大于订单总金额amount
     */
    @TableField("paid_amount")
    private BigDecimal paidAmount;
    /**
     * 项目分类ID
     */
    private Integer categoryid;
    /**
     * 1.公开 2私密
     */
    private Integer projecttype;
    /**
     * 1.普票2专票
     */
    private Integer invoicetype;
    /**
     * 发票内容
     */
    private String invoicecontent;
    /**
     * 项目状态 1: 草稿 2: 已发布 3: 已结束 4:已取消
     */
    private Integer state;
    /**
     * 项目发布时间
     */
    private Date projectstart;
    /**
     * 项目结束时间
     */
    private Date projectfinish;
    /**
     * 项目取消时间
     */
    private Date projectcancel;
    /**
     * 逻辑删除 0:未删除 1:已删除
     */
    @TableLogic
    private Integer deleted;
    private Date createtime;
    @TableField(update = "now()")
    private Date updatetime;

    @ApiModelProperty("支付方式ID")
    private Integer payId;

    @ApiModelProperty("支付方式名称")
    @TableField(exist = false)
    private String payName;

    @ApiModelProperty("支付方式别名")
    @TableField(exist = false)
    private String payNameAlias;

    @ApiModelProperty("支付主体")
    private Integer partyId;

    @Override
    protected Serializable pkVal() {
        return this.projectid;
    }

}
